/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-03-23
 * Time:13:21
 */
import java.util.Scanner;
public class TestDome2 {
    public static int fun(int n){
        //起始条件为终止条件
        if(n==1){
            return 1;
        }
        return n*fun(n-1);
    }
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.print("请输入想求某个数的阶层：");
        int num=in.nextInt();
        int cen=fun(num);
        System.out.println(num+"!="+cen);
    }
}
